package com.retail.bbq.cola.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.retail.bbq.cola.entity.EffectiveGoods;
import com.retail.bbq.cola.enums.DeleteStatusEnum;
import com.retail.bbq.cola.service.EffectiveGoodsService;
import com.retail.bbq.cola.mapper.EffectiveGoodsMapper;
import com.retail.bbq.cola.vo.request.ColaParamRequest;
import org.springframework.stereotype.Service;

/**
* @author jarvis.zhang
* @description 针对表【effective_goods(有效商品表)】的数据库操作Service实现
* @createDate 2025-06-20 15:11:22
*/
@Service
public class EffectiveGoodsServiceImpl extends ServiceImpl<EffectiveGoodsMapper, EffectiveGoods>
    implements EffectiveGoodsService{

    @Override
    public Object getEffectiveGoods(ColaParamRequest request) {
        return baseMapper.selectList(new LambdaQueryWrapper<EffectiveGoods>()
                .eq(EffectiveGoods::getBuCode, request.getBuCode())
                .eq(EffectiveGoods::getSetupId, request.getSetupId())
                .eq(EffectiveGoods::getIsDel, DeleteStatusEnum.no_del.getCode()));
    }
}




